package com.color.admin.system.repository;


import com.color.admin.system.entity.SysDict;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Set;

/**
 * @author HaiQiu
 */
@Repository
public interface DictRepository extends JpaRepository<SysDict,String>, JpaSpecificationExecutor<SysDict> {

    int deleteAllByIdIn(Set<String> dictIds);

    /**
     * 根据父级ID查询子集数据
     * @param dictIds 集合ID
     * @return 集合
     */
    List<SysDict> findAllByParentIdIn(Set<String> dictIds);
}
